<template>
	<view class="classlist">
		<view class="content">
			<navigator url="/pages/preview/preview" class="item" v-for="item in classList" :key="item._id">
				<image :src="item.picurl" mode="aspectFill"></image>
			</navigator>
		</view>
		
	</view>
</template>

<script setup>
const classList = ref([]);
const queryParams ={}
onLoad((e)=>{
	let {id=null,name=null} = e;
	queryParams.classid = id;
	console.log(id,name);
	uni.setNavigationBarTitle({
			title:name
		})
	getclassList();
})
const getClassList=async()=>{
	let res = await uni.request({
		url:"https://tea.qingnian8.com/api/bizhi/wallList",
		data:{
			id:queryParams
		},
		header:{
			"access-key":"wytwt0105"
		}
	})
	if(res.data.errCode===0){
		classList.value = res.data.data
	}
}


</script>

<style lang="scss" scoped>
.classlist{
	.content{
		display: grid;
		grid-template-columns: repeat(3,1fr);
		gap: 5rpx;
		padding: 5rpx;
		.item{
			image{
				height: 440rpx;
				image{
					width: 100%;
					height: 100%;
					display: block;
				}
			}
		}
	}
}
</style>
